package com.chery.media.ui.play

import com.chery.media.R
import com.chery.media.contacts.MusicType
import com.chery.media.library.base.BaseViewModel
import com.chery.media.library.extend.toResString
import com.chery.media.network.model.MusicTypeBean
import com.chery.media.ui.play.bluetooth.BlueToothFragment
import com.chery.media.ui.play.hot.HotFragment
import com.chery.media.ui.play.usb.UsbFragment

class MusicPlayViewModel: BaseViewModel() {

    // 用于切换音乐播放类型数据
    val musicTypes = arrayListOf<MusicTypeBean>().apply {
        add(MusicTypeBean(R.drawable.svg_bluetooth_un_select, R.drawable.svg_bluetooth_selected, R.string.bluetooth.toResString(), MusicType.BLUETOOTH))
        add(MusicTypeBean(R.drawable.svg_usb_un_select, R.drawable.svg_usb_selected, R.string.usb.toResString(), MusicType.USB))
        add(MusicTypeBean(R.drawable.svg_hot_un_select, R.drawable.svg_hot_selected, R.string.hot_list.toResString(), MusicType.HOT_LIST))
    }

    // 用于切换音乐播放类型页面
    val musicFragments = arrayListOf(BlueToothFragment.newInstance(), UsbFragment.newInstance(), HotFragment.newInstance())

}